package com.tendory.rxlocation;

import io.reactivex.Observable;

public class LocationRequester {
    /**
     * 请求定位
     *
     * @return result Observable
     */
    public Observable<MyLocation> requestLocation() {
        return requestLocation(new ClientOption());
    }

    public Observable<MyLocation> requestLocation(ClientOption option) {
        return RxLocation.create().setOption(option).requestLocation();
    }

    /**
     * 获取最后位置
     *
     * @return result Observable
     */
    public Observable<MyLocation> lastLocation() {
        return RxLocation.create().getLastLocation();
    }
}
